package cn.tedu.mimall.product.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 商品修改数据
 *
 * @author rz
 * @version 0.0.1
 */
@Data
public class ProductUpdateDTO implements Serializable {
    /**
     * 商品标题
     */
    @ApiModelProperty(value = "商品标题", required = true)
    @NotNull(message = "商品标题不能为空")
    private String title;
    /**
     * 商品图片地址
     */
    @ApiModelProperty(value = "商品图片地址", required = true)
    @NotNull(message = "商品图片地址不能为空")
    private String url;
    /**
     * 商品简介
     */
    @ApiModelProperty("商品简介")
    private String description;
    /**
     * 商品价格
     */
    @ApiModelProperty(value = "商品价格", required = true)
    @NotNull(message = "商品价格不能为空")
    private Double price;
    /**
     * 商品原价
     */
    @ApiModelProperty("商品原价")
    private Double oldPrice;
    /**
     * 商品状态
     */
    @ApiModelProperty(value = "商品状态", required = true)
    @NotNull(message = "商品状态不能为空")
    private Long productStateId;
    /**
     * 商品分类
     */
    @ApiModelProperty(value = "商品分类", required = true)
    @NotNull(message = "商品分类不能为空")
    private Long classifyId;
    /**
     * 库存
     */
    @ApiModelProperty(value = "库存")
    private Integer num;
}
